/*
 * @(#)Constants.java 创建于 2015-09-09 16:23:02
 *
 * 版权：版权所有 Bsoft 保留所有权力。
 */
package com.bsoft.gol.hcb.utils;

import org.atag.util.common.SpringPropertiesUtil;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;

/**
 * @author <a href="mailto:chinnsii@163.com">zhengshi</a>
 */
@Component
@DependsOn("springPropertiesUtil")
public class Constants implements InitializingBean {

    public static String PRESCRIPTION_PLATFORM_URL = "http://10.8.2.178:8300/bs-pts/";

    //医院平台serviceType
    public static String SERVICE_TYPE_SERVICE = "service";
    //医院平台MsgVersion
    public static String MSG_VERSION = "4.0";
    //医院平台Sender
    public static String SENDER = "GOL";

    //医院平台Sender
    public static String SENDER_HOL = "HOL";

    public static String WSDL_URL="";


    public static final String USERID_SOURCE = "hcn";

    public static final String USERID_TYPE_CODE = "01";

    public static final String MANAGE_UNIT = "hcn";

    public static final Integer THREE = 3;
    public static final Integer ZERO = 0;
    public static final Integer ONE = 1;
    public static final Integer TWO = 2;
    public static final Integer FOUR = 4;

    /**
    * 通讯录相关
    */
    public static final String METHOD_GET = "GET";
    public static final String METHOD_POST = "POST";
    public static final String METHOD_PUT = "PUT";
    public static final String METHOD_DELETE = "DELETE";
    public static final String USER_ROLE_APPADMIN = "appAdmin";

    /*
    * 问诊类型
    */

    public final static String CONSULT_TYPE_RETURNVISIT = "returnVisit";
    /*
    * 计费规则类型
    */
    //计重
    public static final String UNIT_WEIGHT = "1";
    //计件
    public static final String UNIT_NUM = "2";

    /**
     * 获取媒体文件url
     */
    public static final String GET_MEDIA_URL_AMR = "https://api.weixin.qq" +
            ".com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id=MEDIA_ID";

    /**
     * 获取access_token的接口地址（GET） 限200（次/天）
     */
    public final static String ACCESS_TOKEN_URL = "https://api.weixin.qq" +
            ".com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";

    /**
     * 微信平台用户授权接口  (微信授权接口)
     */
    public static String OPENID_URL = "https://api.weixin.qq" +
            ".com/sns/oauth2/access_token?appid=APPID&secret=APPSECRET&code=CODE&grant_type=authorization_code";

    /**
     * 项目调用微信平台授权接口  (微信菜单请求接口)
     */
    public static String AUTH_PROJECT_URL = "https://open.weixin.qq" +
            ".com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope" +
            "=snsapi_base" +
            "&state=STATE#wechat_redirect";


    public static String COMMON_PROXY_URL= "";
    public static String WHIS_PATH_URL = "";
    @Override
    public void afterPropertiesSet() throws Exception {
        Constants.COMMON_PROXY_URL = SpringPropertiesUtil.get("common_proxy_url");
        Constants.WHIS_PATH_URL = SpringPropertiesUtil.get("whis_path_url");
    }

}
